rm -rf /usr/node;
mv ./ttnode/node /usr/;
sleep 1s;
chmod 777 -R /usr/node;
sleep 1s;
mv ./ttnode/tt_info.sh /root/;
sleep 1s;
chmod 777 /root/tt_info.sh;
sleep 1s;
echo 'http://mirrors.ustc.edu.cn/alpine/v3.14/community' >>/etc/apk/repositories;
sleep 2s;
apk update;
sleep 2s;
apk add libstdc++;
sleep 2s;
apk add net-tools;
sleep 2s;
apk add libqrencode;
sleep 2s;
mkdir /mnts;
sleep 2s;
mount /dev/sdb1 /mnts;
sleep 1s;
echo "

正在启动甜糖程序，请耐心等待
";
/usr/node/ttnode -p /mnts -i /usr/node/uid.txt;
sleep 20s;
echo "

甜糖启动成功，正在获取二维码及端口信息，请耐心等侯
";
sleep 20s;
/root/tt_info.sh;
sleep 2s;
echo "

第一次获取甜糖信息可能会出现信息不全，可在脚本运行完成后，手动输入/root/tt_info.sh再次获取甜糖二维码及端口信息

正在清理下载的缓存文件
";
sleep 20s
rm -R ./ttnode
sleep 2s;
echo "

安装结束，10秒后将自动退出脚本，如获取到的甜糖二维码及端口信息不全，请ssh手动输入/root/tt_info.sh
";
sleep 10s
exit 0